﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class OrderInfo
    {
        public int Id { get; set; }

        public string PassengerName { get; set; }

        public string PhoneNumber { get; set; }

        public string StartAddress { get; set; }

        public string EndAddress { get; set; }

        public double StartLat { get; set; }

        public double StartLng { get; set; }

        public double EndLat { get; set; }

        public double EndLng { get; set; }

        public int DriverId { get; set; }
        
        public int CarId { get; set; }

        /// <summary>
        /// 下单时间
        /// </summary>
        public DateTime CallTime { get; set; }

        /// <summary>
        /// 平台接收时间
        /// </summary>
        public DateTime TakeTime { get; set; }

        /// <summary>
        /// 平台提交时间
        /// </summary>
        public DateTime SubmitTime { get; set; }

        /// <summary>
        /// 客户接收到消息时间
        /// </summary>
        public DateTime PsgerAcceptTime { get; set; }

        /// <summary>
        /// 司机接收到消息时间
        /// </summary>
        public DateTime DriverAcceptTime { get; set; }

        /// <summary>
        /// 完成时间
        /// </summary>
        public DateTime FinishTime { get; set; }

        /// <summary>
        /// 预定使用时间
        /// </summary>
        public DateTime AgreeStartTime { get; set; }

        /// <summary>
        /// 预定结束时间
        /// </summary>
        public DateTime AgreeEndTime { get; set; }

        public short Price { get; set; }


        /// <summary>
        /// 手机端生成的订单号 ddHHmmss
        /// </summary>
        public string PhoneOrderId { get; set; }

        public string Remark { get; set; }

        public int UserId { get; set; }

        public string UserRealName { get; set; }

        public string CarPhoneNumber { get; set; }

        public string CarNo { get; set; }

        public string DriverPhoneNumber { get; set; }

        public string DriverCardId { get; set; }
         
        public string DriverName { get; set; }

        public OrderState State { get; set; }
         
    }

    public enum OrderState
    {
        S0_Cancled = 0,
        S1_NewOrder = 1,
        S2_TakenByPlatform = 2,
        S3_SetCarAndDriver = 3,
        S4_OrderPaid =4,
        S5_SentInfo = 5,
        S6_AcceptByDriver = 6,
        S7_Finish = 7,
        S9_Unknown = 9
    }
}
